package org.xp.study.springboot.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.xp.study.springboot.entiy.Person;

@RestController
public class StudyController {

    @Autowired
    private Person person;

    @GetMapping("/message")
    public String getMessage(String arg1) {
        System.out.println("args26:" + arg1);
        System.out.println("xp name:"+person.getName());
        return String.format("Hello, this is a simple Spring Boot application! args: %s,name: %s,desc: %s",arg1,person.getAge(),person.getDesc()) ;
    }

}